<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;padding: 0;
        }
        .box{
            width: 180px;
            height: 300px;
            background: deepskyblue url(img/charector.png) no-repeat;
            margin: 50px auto;
            animation: hhsb 0.5s steps(7) infinite;
        }
        @keyframes hhsb{
            from{
                background-position: none;
            }
            to{
                background-position: -1260px 0;
            }
        }
    </style>
</head>
<body>
    <div class="box"></div>
    
</body>
<script>
    var box = document.querySelector('.box');
    box.style.height = '400px';
    box.style.backgroundColor = 'pink';
</script>
</html>